def B(n,h,w):
    print(n+"的身高："+str(h)+"米 \t 体重:"+str(w)+"千克")
    bmi=w/(h*h)
    print(n+"的BMI："+str(bmi))
    if bmi<18.5:
        print("您的体重过轻o(╥﹏╥)o\n")
    if bmi>=18.5:
        print("正常范围，继续保持(*^▽^*)\n")
    if bmi>18.5 and bmi<24.9:
        print("您的体重过重(ಥ_ಥ)\n ")
    if bmi>29.9:
        print("超重啦!!!∑(ﾟДﾟノ)ノ\n")

#利用可变参数，一次算出多个BMI
def B(*n):
    for q in n:
        for n in q:
            name = n[0]
            height = n[1]
            weight = n[2]
            print(name+"的身高："+str(height)+"米 \t 体重:"+str(weight)+"千克")
            bmi=weight/(height*height)
            print(name+"的BMI"+str(bmi))
            if bmi<18.5:
                print("您的体重过轻o(╥﹏╥)o\n")
            if bmi>=18.5 and bmi<24.9:
                print("正常范围，继续保持(*^▽^*)\n")
            if bmi>24.5 and bmi<29.9:
                print("您的体重过重(ಥ_ಥ)\n ")
            if bmi>29.9:
                print("超重啦!!!∑(ﾟДﾟノ)ノ\n")
#调用函数
list_w = [['张凯',1.80,65],['克强',1.50,60],['张杰',1.80,70]]
#list_m = [['张大',1.80,65],['老李',1.50,60],['阿琪',1.65,57]]
B(list_w)

